package org.example.wx_springboot.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.example.wx_springboot.entity.Shoppingcart;
import org.example.wx_springboot.mapper.ShoppingcartMapper;
import org.example.wx_springboot.service.IShoppingcartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@Slf4j
public class ShoppingcartService implements IShoppingcartService {

    @Autowired
    ShoppingcartMapper shoppingcartMapper;

    @Override
    public List<Shoppingcart> list() {
        return shoppingcartMapper.list();
    }

    @Override
    public void save(Shoppingcart shoppingcart) {
        shoppingcartMapper.save(shoppingcart);
    }

    @Override
    public void deleteById(Integer id) {
        shoppingcartMapper.deleteById(id);
    }

    @Override
    public void update(Shoppingcart obj) {
        shoppingcartMapper.updateById(obj);
    }
}
